import Vue from "vue";
import Router from "vue-router";
import Index from "@/page/index";//首页
import IndexSkip from "@/page/indexSkip";//用户登陆跳转页面 
import Login from "@/page/login";
import registration from "@/page/registration";//注册页
import signInLogin from "@/page/sign-in-login"; //定时任务管理

//驾驶舱
import RealTimeChain from "@/components/real-time/realTimeChain"; // tag2连锁店实时数据驾驶舱
import RealTimeMall from "@/components/real-time/realTimeMall"; // tag1购物中心实时数据驾驶舱
// import RealTimePart1 from "@/components/real-time/realTimePart1"; // 实时数据驾驶舱part1
//购物中心分析报表
import Areport from "@/components/report-mall/query/areport";  //购物中心分析报表
import mallFreeQuery from "@/components/report-mall/query/mallFreeQuery"; // 自定义报表
import mallCompanyQuery from "@/components/report-mall/query/mallCompanyQuery"; // 企业客流查询
import mallCaseQuery from "@/components/report-mall/query/mallCaseQuery"; // 案场客流查询
import mallAreaQuery from "@/components/report-mall/query/mallAreaQuery"; // 区域客流查询
import mallCaseVariableTime from "@/components/report-mall/analysis/mallCaseVariableTime"; // 高低峰时间分析(案场)
import mallAreaVariableTime from "@/components/report-mall/analysis/mallAreaVariableTime"; // 高低峰时间分析(区域)

import mallWeatherAnalysis  from "@/components/report-mall/analysis/mallWeatherAnalysis";      //天气分析

import mallCaseHeatMap from "@/components/report-mall/analysis/mallCaseHeatMap"; // 热力图(案场)
import mallCaserank from "@/components/report-mall/operateAnaly/mallCaserank";      //案场运营排行榜
import mallArearank from "@/components/report-mall/operateAnaly/mallArearank";      //商铺运营排行榜

import mallInformation from "@/components/report-mall/operateAnaly/mallInformation";      //业态业种分析

//购物中心KPI对比
import mallCaseTimePk from "@/components/report-mall/kpiPK/mallCaseTimePk";      //案场时间对比
import mallAreaTimePk from "@/components/report-mall/kpiPK/mallAreaTimePk";      //区域时间对比
import mallAreaPK from "@/components/report-mall/kpiPK/mallAreaPK";      //区域对比

//案场运营排行榜
import passengerFlowRanking from "@/components/report-mall/operateAnaly/passengerFlowRanking"; //客流排行
import mallCasePassRank from "@/components/report-mall/operateAnaly/mallCasePassRank"; //客流排行

//购物中心人脸数据查询
import mallCompFace from "@/components/report-mall/faceData/mallCompFace"; //企业人脸数据查询
import mallCaseFace from "@/components/report-mall/faceData/mallCaseFace"; //案场人脸数据查询
import mallAreaFace from "@/components/report-mall/faceData/mallAreaFace"; //区域人脸数据查询
import mallShopDiversion from "@/components/report-mall/faceData/mallShopDiversion"; //店铺导流
import firstShop from "@/components/report-mall/faceData/firstShop"; //首选店铺
import mallShopRanking from "@/components/report-mall/faceData/mallShopRanking"; //店铺排行

//连锁店分析报表
import Chain from "@/components/report-chain/query/chain";  //购物中心分析报表
import chainFreeQuery from "@/components/report-chain/query/chainFreeQuery"; // 自定义报表
import chainCompanyQuery from "@/components/report-chain/query/chainCompanyQuery"; // 企业客流查询
import chainCaseQuery from "@/components/report-chain/query/chainCaseQuery"; // 案场客流查询
import chainAreaQuery from "@/components/report-chain/query/chainAreaQuery"; // 区域客流查询
import chainCaseVariableTime from "@/components/report-chain/analysis/chainCaseVariableTime"; // 高低峰时间分析(案场)
import chainAreaVariableTime from "@/components/report-chain/analysis/chainAreaVariableTime"; // 高低峰时间分析(区域)

import chainCaserank from "@/components/report-chain/operateAnaly/chainCaserank";      //案场运营排行榜
import chainArearank from "@/components/report-chain/operateAnaly/chainArearank";      //商铺运营排行榜

//连锁店人脸数据查询
import chainCompFace from "@/components/report-chain/faceData/chainCompFace"; //企业人脸数据查询
import chainCaseFace from "@/components/report-chain/faceData/chainCaseFace"; //案场人脸数据查询
import chainAreaFace from "@/components/report-chain/faceData/chainAreaFace"; //区域人脸数据查询

//连锁店kpi对比
import chainCasePk from "@/components/report-chain/kpiPK/chainCasePk";      //案场对比
import chainCaseTimePk from "@/components/report-chain/kpiPK/chainCaseTimePk";      //案场时间对比
import chainAreaTimePk from "@/components/report-chain/kpiPK/chainAreaTimePk";      //案场时间对比
//系统管理
import SysHome from "@/components/sys/sysHome"; // 系统管理主页面
import TagManager from "@/components/sys/tagmanager"; // 标签指标
import EnterpriseManager from "@/components/sys/enterprisemanager"; // 企业
import MenuManager from "@/components/sys/menumanager"; /// 菜单
import RoleControl from "@/components/sys/roleControl";//控制角色管理
import RoleData from "@/components/sys/roleData";//数据角色管理
import PhyManager from "@/components/sys/phymanager"; // 区域管理
import MallManager from "@/components/sys/mallmanager"; ///案场
import UserManager from "@/components/sys/usermanager"; //用户
import Record from "@/components/sys/record"; //系统日志
import AddEnterprise from "@/components/sys/addEnterprise"; //新增企业
import NewDeviceState from "@/components/sys/newDeviceState"; //客流设备管理
import NotMount from "@/components/sys/NotMount"; // 未挂载案场设备
import FaceState from "@/components/sys/faceState"; //客流设备管理
import PosDeviceState from "@/components/sys/posDeviceState"; //pos设备管理
import DataSum from "@/components/sys/dataSum"; //店铺数据汇总
import IndividualConfig from "@/components/sys/individualConfig"; //个性化设置
import OpeningHours from "@/components/sys/openingHours"; //营业时间管理
import DataBase from "@/components/sys/dataBase"; //数据库管理
import ExpTime from "@/components/sys/expTime"; //许可证授权
import HeatmapInstall from "@/components/sys/heatmapInstall"; //热力图管理
import Coordinate from "@/components/sys/coordinate"; //热力图配置
import APImanage from "@/components/sys/APImanage"; //API管理
import myAPI from "@/components/sys/myAPI"; //我的API
import DataSync from "@/components/sys/dataSync"; //数据同步配置
import syncTask from "@/components/sys/syncTask"; //同步任务
import timings from "@/components/sys/timings"; //定时任务管理
import VCADeviceState from "@/components/sys/VCADeviceState"; //VCA设备管理
import dataMapping from "@/components/sys/dataMapping"; //数据同步
import chongbangUser from "@/components/sys/chongbangUser"; //单点登录 崇邦用户
//会员管理
import member from "@/components/sys/memberFile/member";//会员管理
import memberHome from "@/components/sys/memberFile/memberHome";//会员管理主页

import memberList from "@/components/sys/memberFile/memberList";//会员列表
import historicalRecord from "@/components/sys/memberFile/historicalRecord";//推送记录

import memberDetails from "@/components/sys/memberFile/memberDetails";//会员详情
import caseInfo from "@/components/sys/memberFile/caseInfo";//进场频次
import areaInfo from "@/components/sys/memberFile/areaInfo";//进店频次
import areaTrajectory from "@/components/sys/memberFile/areaTrajectory";//逛店轨迹
import brandLike from "@/components/sys/memberFile/brandLike";//品牌喜好
import formatLike from "@/components/sys/memberFile/formatLike";//业态喜好


import table from "@/components/common/table"; //定时任务管理

// 解决两次访问相同路由地址报错
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

Vue.use(Router);
export default new Router({
  mode: 'history',
  routes: [
    {
      name: "table",
      path: "/table",
      component: table,
      meta: {type:'realTime',title:'实时数据驾驶舱'}
    },

    {
      name: "realTimeChain",
      path: "/realTimeChain",
      component: RealTimeChain,
      meta: {type:'realTime',title:'实时数据驾驶舱'}
    },
    {
      name: "realTimeMall",
      path: "/realTimeMall",
      component: RealTimeMall,
      meta: {type:'realTime',title:'实时数据驾驶舱'}
    },
    {
      name: "indexSkip",
      path: "/",
      component: IndexSkip,
      meta: {type:'indexSkip'},
    },
    {
      name: "index",
      path: "/index",
      component: Index,
      meta: {type:'index'},
    },
    {
      name: "login",
      path: "/login",
      component: Login,
      meta: { NoLogin: true ,title:'登录'}
    },
    {
      name: "registration",
      path: "/registration",
      component: registration,
      meta: { IsRegistration: true ,title:'注册页'}
    },
    {
      name: "signInLogin",
      path: "/sign-in-login",
      component: signInLogin,
      meta: { IsRegistration:true ,title:'单点登录'}
    },
    {
      name: "mallmanager",
      path: "/mallmanager",
      component: MallManager,
      meta: { type:"sysHome"  ,title:'案场管理'}
    },
    {
      name: "usermanager",
      path: "/usermanager",
      component: UserManager,
      meta: { type:"sysHome"  ,title:'用户管理'}
    },
    {
      name: "phymanager",
      path: "/phymanager",
      component: PhyManager,
      meta: { type:"sysHome"  ,title:'区域信息管理'}
    },
    {
      name: "roleControl",
      path: "/roleControl",
      component: RoleControl,
      meta: { type:"sysHome"  ,title:'菜单权限管理'}
    },
    {
      name: "roleData",
      path: "/roleData",
      component: RoleData,
      meta: { type:"sysHome"  ,title:'数据权限管理'}
    },

    {
      name: "enterprisemanager",
      path: "/enterprisemanager",
      component: EnterpriseManager,
      meta: { type:"sysHome"  ,title:'企业管理'}
    },

    {
      name: "menumanager",
      path: "/menumanager",
      component: MenuManager,
      meta: { type:"sysHome"  ,title:'菜单管理'}
    },
    {
      name: "tagmanager",
      path: "/tagmanager",
      component: TagManager,
      meta: { type:"sysHome"  ,title:'标签管理'}
    },
    {
      name: "record",
      path: "/record",
      component: Record,
      meta: { type:"sysHome"  ,title:'系统日志'}
    },
    {
      name: "sysHome",
      path: "/sysHome",
      component: SysHome,
      meta: { type:"sysHome"  ,title:'系统管理'}
    },
    {
      name: "addEnterprise",
      path: "/addEnterprise",
      component: AddEnterprise ,
      meta: { type:"sysHome"  ,title:'新增企业'}
    },
    {
      name: "NotMount",
      path: "/NotMount",
      component: NotMount,
      meta: { type:"sysHome"  ,title:'未挂载案场设备'}
    },
    {
      name: "newDeviceState",
      path: "/newDeviceState",
      component: NewDeviceState,
      meta: { type:"sysHome"  ,title:'客流·设备管理'}
    },

    {
      name: "faceState",
      path: "/faceState",
      component: FaceState,
      meta: { type:"sysHome"  ,title:'客流设备管理'}
    },
    {
      name: "posDeviceState",
      path: "/posDeviceState",
      component: PosDeviceState,
      meta: { type:"sysHome"  ,title:'pos设备管理'}
    },
    {
      name: "dataSum",
      path: "/dataSum",
      component: DataSum,
      meta: { type:"sysHome"  ,title:'数据汇总'}  
    },
    {
      name: "dataSync",
      path: "/dataSync",
      component: DataSync,
      meta: { type:"sysHome"  ,title:'数据同步配置'}   
    },
    {
      name: "syncTask",
      path: "/syncTask",
      component: syncTask,
      meta: { type:"sysHome"  ,title:'任务记录'}
    },
    {
      name: "timings",
      path: "/timings",
      component: timings,
      meta: { type:"sysHome"  ,title:'定时任务管理'}
    },
    {
      name: "VCADeviceState",
      path: "/VCADeviceState",
      component: VCADeviceState,
      meta: { type:"sysHome"  ,title:'VCA设备管理'}
    },
    {
      name: "dataMapping",
      path: "/dataMapping",
      component: dataMapping,
      meta: { type:"sysHome"  ,title:'数据同步'}
    },
    {
      name: "chongbangUser",
      path: "/chongbangUser",
      component: chongbangUser,
      meta: { type:"sysHome"  ,title:'崇邦用户'}
    },
    {
      name: "member",
      path: "/member",
      component: member,
      meta: { type:"member"  ,title:'人员管理'}
    },
    {
      name: "memberHome",
      path: "/memberHome",
      component: memberHome,
      meta: { type:"member"  ,title:'会员管理'}
    },
    {
      name: "memberList",
      path: "/memberList",
      component: memberList,
      meta: { type:"member"  ,title:'人员列表'}
    },
    {
      name: "historicalRecord",
      path: "/historicalRecord",
      component: historicalRecord,
      meta: { type:"member"  ,title:'推送记录'}
    },

    {
      name: "memberDetails",
      path: "/memberDetails",
      component: memberDetails,
      meta: { type:"member"  ,title:'会员详情'},
      children:[
        {
          path:'/',
          name: 'caseInfo',
          component: caseInfo,
          meta: { type:"member"  ,title:'进场频次'}
        },
        {
          path:'/areaInfo',
          name: 'areaInfo',
          component: areaInfo,
          meta: { type:"member"  ,title:'进店频次'}
        },
        {
          path:'/areaTrajectory',
          name: 'areaTrajectory',
          component: areaTrajectory,
          meta: { type:"member"  ,title:'逛店轨迹'}
        },
        {
          path:'/brandLike',
          name: 'brandLike',
          component: brandLike,
          meta: { type:"member"  ,title:'品牌喜好'}
        },
        {
          path:'/formatLike',
          name: 'formatLike',
          component: formatLike,
          meta: { type:"member"  ,title:'业态喜好'}
        }
      ],
    },

    {
      name: "individualConfig",
      path: "/individualConfig",
      component: IndividualConfig,
      meta: { type:"sysHome"  ,title:'个性化设置'}
    },
    {
      name: "openingHours",
      path: "/openingHours",
      component: OpeningHours,
      meta: { type:"sysHome"  ,title:'营业时间管理'}
    },
    {
      name: "dataBase",
      path: "/dataBase",
      component: DataBase,
      meta: { type:"sysHome"  ,title:'数据库管理'}
    },
    {
      name: "expTime",
      path: "/expTime",
      component: ExpTime,
      meta: { type:"sysHome"  ,title:'许可证授权'}
    },
    {
      name: "heatmapInstall",
      path: "/heatmapInstall",
      component: HeatmapInstall,
      meta: { type:"sysHome",title:'热力图管理'}
    },
    {
      name: "coordinate",
      path: '/coordinate',
      component: Coordinate,
      meta: { type:"sysHome" ,title:'热力图配置',}
    },
    {
      name: "APImanage",
      path: '/APImanage',
      component: APImanage,
      meta: { type:"sysHome" ,title:'API管理',}
    },
    {
      name: "myAPI",
      path: '/myAPI',
      component: myAPI,
      meta: { type:"sysHome" ,title:'API管理',}
    },
    {
      name:"mallWeatherAnalysis",
      path:"/mallWeatherAnalysis",
      component:mallWeatherAnalysis,
      meta:{type:"areport",title:'购物中心报表'}
    },
    {
      name: "areport",
      path: "/areport",
      component: Areport,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallFreeQuery",
      path: "/mallFreeQuery",
      component: mallFreeQuery,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallCompanyQuery",
      path: "/mallCompanyQuery",
      component: mallCompanyQuery,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallCaseQuery",
      path: "/mallCaseQuery",
      component: mallCaseQuery,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallAreaQuery",
      path: "/mallAreaQuery",
      component: mallAreaQuery,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallCaseVariableTime",
      path: "/mallCaseVariableTime",
      component: mallCaseVariableTime,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallAreaVariableTime",
      path: "/mallAreaVariableTime",
      component: mallAreaVariableTime,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallCaseHeatMap",
      path: "/mallCaseHeatMap",
      component: mallCaseHeatMap,
      meta: {type:'areport'}
    },
    {
      name: "mallArearank",
      path: "/mallArearank",
      component: mallArearank,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallInformation",
      path: "/mallInformation",
      component: mallInformation,
      meta: {type:'areport' ,title:'购物中心报表'}
    },

    {
      name: "passengerFlowRanking",
      path: "/passengerFlowRanking",
      component: passengerFlowRanking,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallCasePassRank",
      path: "/mallCasePassRank",
      component: mallCasePassRank,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallCaserank",
      path: "/mallCaserank",
      component: mallCaserank,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallCaseTimePk",
      path: "/mallCaseTimePk",
      component: mallCaseTimePk,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallAreaTimePk",
      path: "/mallAreaTimePk",
      component: mallAreaTimePk,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallAreaPK",
      path: "/mallAreaPK",
      component: mallAreaPK,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallCaseFace",
      path: "/mallCaseFace",
      component: mallCaseFace,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallCompFace",
      path: "/mallCompFace",
      component: mallCompFace,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallAreaFace",
      path: "/mallAreaFace",
      component: mallAreaFace,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallShopDiversion",
      path: "/mallShopDiversion",
      component: mallShopDiversion,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "firstShop",
      path: "/firstShop",
      component: firstShop,
      meta: {type:'areport' ,title:'购物中心报表'}
    },
    {
      name: "mallShopRanking",
      path: "/mallShopRanking",
      component: mallShopRanking,
      meta: {type:'areport' ,title:'购物中心报表'}
    },

    {
      name: "chain",
      path: "/chain",
      component: Chain,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainFreeQuery",
      path: "/chainFreeQuery",
      component: chainFreeQuery,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainCompanyQuery",
      path: "/chainCompanyQuery",
      component: chainCompanyQuery,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainCaseQuery",
      path: "/chainCaseQuery",
      component: chainCaseQuery,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainAreaQuery",
      path: "/chainAreaQuery",
      component: chainAreaQuery,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainCaseVariableTime",
      path: "/chainCaseVariableTime",
      component: chainCaseVariableTime,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainAreaVariableTime",
      path: "/chainAreaVariableTime",
      component: chainAreaVariableTime,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainArearank",
      path: "/chainArearank",
      component: chainArearank,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainCaserank",
      path: "/chainCaserank",
      component: chainCaserank,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainCaseTimePk",
      path: "/chainCaseTimePk",
      component: chainCaseTimePk,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainAreaTimePk",
      path: "/chainAreaTimePk",
      component: chainAreaTimePk,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainCasePk",
      path: "/chainCasePk",
      component: chainCasePk,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainCompFace",
      path: "/chainCompFace",
      component: chainCompFace,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainCaseFace",
      path: "/chainCaseFace",
      component: chainCaseFace,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    {
      name: "chainAreaFace",
      path: "/chainAreaFace",
      component: chainAreaFace,
      meta: {type:'chain' ,title:'连锁店报表'}
    },
    
  ]
});
